package svc

import (
	"collect/api/internal/config"
	"collect/collectrpc/collectrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config     config.Config
	CollectRpc collectrpcclient.Collectrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		CollectRpc: collectrpcclient.NewCollectrpc(zrpc.MustNewClient(c.CollectRpc)),
	}
}
